package com.wzdigit.wms.basic.mapper.core.basic;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wzdigit.framework.orm.mybatis.MyBatisRepository;
import com.wzdigit.wms.basic.domain.basic.Sku;
import com.wzdigit.wms.basic.client.request.basic.SearchSkuInputRequest;
import com.wzdigit.wms.basic.client.request.basic.SearchSkuRequest;
import com.wzdigit.wms.basic.client.response.basic.SkuBaseResponse;
import com.wzdigit.wms.basic.client.response.basic.SkuInputResponse;
import org.apache.ibatis.annotations.Param;
import java.math.BigDecimal;
import java.util.List;

/**
 * 货品
 * @author yangdongjie
 * @SkuMapper.java
 * @2021年1月20日下午5:12:48
 */
@MyBatisRepository
public interface SkuMapper extends BaseMapper<Sku> {
	
	@SuppressWarnings("rawtypes")
	List<SkuBaseResponse> selectAll(SearchSkuRequest dto);
	
	SkuBaseResponse selectOneBySkuId(@Param("skuId")Integer skuId);

	SkuBaseResponse findBySkuCateId(@Param("skuCateId")Integer skuCateId);

	SkuBaseResponse selectOneBySkuCode(@Param("skuCode")String skuCode);

	List<BigDecimal> selectSkuBySkuId(@Param("skuId")BigDecimal skuId);

	Integer selectSkuIdByCode(@Param("skuCode")String skuCode);

	List<SkuInputResponse> selectSkuInput(SearchSkuInputRequest dto);

	SkuBaseResponse getSkuByCode(@Param("skuCode") String skuCode);
	
	List<String> getSkuCodeBySkuIdList(@Param("skuIdList") List<Integer> skuIdList);
}